<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.hk.dao.*,com.hk.entity.*" %>
<%
	request.setCharacterEncoding("utf-8");
	response.setCharacterEncoding("utf-8");
	String uname = request.getParameter("uname");	
	String pwd = request.getParameter("pwd");
	
	User u = new User(uname,pwd);
	UserDAO sd = new UserDAO();
	int n = sd.addUser(u);
	if(n>0)
		response.sendRedirect("login.jsp"); 
	else 
		response.sendRedirect("regist.html");
%>
